package com.tianji.learning.controller;


import com.tianji.common.domain.dto.PageDTO;
import com.tianji.learning.domain.po.ReplyPageQuery;
import com.tianji.learning.domain.vo.ReplyVO;
import com.tianji.learning.service.IInteractionReplyService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 互动问题的回答或评论 前端控制器
 * </p>
 *
 * @author author
 * @since 2024-12-18
 */
@RestController
@RequestMapping("/admin/replies")
@Api(tags = "互动问题的回答或评论相关接口")
public class InteractionReplyAdminController {
    @Autowired
    private IInteractionReplyService replyService;

    @GetMapping("/page")
    public PageDTO<ReplyVO> replyPage(ReplyPageQuery query) {
       return replyService.replyPageAdmin(query);
    }
    @PutMapping("/{id}/hidden/{hidden}")
    public void hidden(@PathVariable("id") Long id ,@PathVariable("hidden") Boolean hidden){
        replyService.hidden(id, hidden);
    }
}
